package thinkingJava.chapter14;

public class Position {
	private String title;
	private Person2 person;
	public Position(String jobTitle, Person2 employee) {
		this.title = jobTitle;
		this.person = employee;
		if (person == null) {
			person = Person2.NULL;
		}
	}
	public Position(String jobTitle) {
		this.title = jobTitle;
		person = Person2.NULL;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle (String newTitle) {
		this.title = newTitle;
	}
	public Person2 getPerson() {
		return person;
	}
	public void setPerson(Person2 employee) {
		person = employee;
		if (person == null) {
			person = Person2.NULL;
		}
	}
	public String toString() {
		return "Position : " + title + "  " + person;
	}
}
